<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

String s[]=new String[4];
 s[0]=request.getParameter("id");
 s[1]=request.getParameter("money");

%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'updateInfo.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">

	<script type="text/javascript">
		function cash(){
			var nv0=document.getElementById("display");
			   		nv0.innerHTML="正在使用现金支付...";
			   		setTimeout(function(){  //使用  setTimeout（）方法设定定时2000毫秒
					window.location.reload();//页面刷新
					},2000);
		}
	</script>
	
	 <script type="text/javascript">        
        function EnterPress(e){
            var e=e||window.event;
            if (e.keyCode == 13) {
                var nv1=document.getElementById("cost");
			    var nv2=document.getElementById("total");
				var nv3=document.getElementById("return");
				var nv4=parseInt(nv2.value)-parseInt(nv1.value);
				nv3.value=nv4;
            } 
        }
	</script>
	
	<style type="text/css">
		<!--
		ul#nav{ width:100%; height:60px; background:#00A2CA;margin:0 auto} 
		ul#nav li{display:inline; height:60px} 
		ul#nav li a{display:inline-block; padding:0 20px; height:60px; line-height:60px;
		 color:#FFF; font-family:"\5FAE\8F6F\96C5\9ED1"; font-size:16px} 
		ul#nav li a:hover{background:#0095BB}/*设置鼠标滑过或悬停时变化的背景颜色*/ 
	-->
	</style>
  </head>
  
  <body>
    结算页面 <p>
    <ul id="nav"> 
    <li><a href="javascript:cash()">现金支付</a></li> 
    <li><a href="javascript:cash()">微信支付</a></li> 
    <li><a href="javascript:cash()">支付宝支付</a></li> 
    <li><a href="javascript:cash()">银行卡支付</a></li>
	</ul>
	<p>
	消费金额为：<%=s[1] %><input type="hidden" id="cost" name="cost" value=<%=s[1] %>/>
	</p>
	
	<div id="display">
		总共收取：<input type="text" id="total" name="total" onkeypress="EnterPress(event)"/><p/>
		应当找回：<input type="text" id="return" name="return" />
	</div>
    
  </body>
</html>
